package com.lsp.microarticle.article.service;

import com.lsp.microarticle.article.params.AddArticleParam;
import com.lsp.microarticle.article.params.ArticlePageParam;
import com.lsp.microarticle.article.params.ArticleSearchParam;
import com.lsp.microarticle.article.vo.ArticleVo;
import com.lsp.microarticle.article.vo.OneArticleInfoVo;
import com.lsp.microcommon.common.PageVo;
import com.lsp.microcommon.entity.Article;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ArticleService{

    void addArticle(AddArticleParam addArticleParam);
    String uploadImg(MultipartFile file);

    PageVo<Article> articlePageInfo(ArticlePageParam param);

    PageVo<ArticleVo> articlePage(ArticleSearchParam param);

    OneArticleInfoVo selectInfoById(Integer articleId);
//    定时任务调用的方法，用来批量更新数据库的like_num
    void updateLikeNumBatch();

    List<ArticleVo> articleRank(Integer count);
}
